dfa8af8861b3494d930659eb2bcf6e2dc79a2d12,src/edu/stanford/nlp/dcoref/CorefChain.java,CorefChain,CorefChain,#CorefCluster#Map#,284
Before Change
mentions = new ArrayList<CorefMention>();
mentionMap = Generics.newHashMap();
CorefMention represents = null;
for (Mention m : c.getCorefMentions()) {
CorefMention men = new CorefMention(m, positions.get(m));
mentions.add(men);
IntPair position = new IntPair(men.sentNum, men.headIndex);
if (!mentionMap.containsKey(position)) mentionMap.put(position, Generics.<CorefMention>newHashSet());
mentionMap.get(position).add(men);
if (men.moreRepresentativeThan(represents)) {
represents = men;
}
}
representative = represents;
Collections.sort(mentions, new MentionComparator());
}
/** Constructor required by CustomAnnotationSerializer */
After Change
mentions = new ArrayList<CorefMention>();
mentionMap = Generics.newHashMap();
CorefMention represents = null;
for (Mention m : c.getCorefMentions()) {
CorefMention men = new CorefMention(m, positions.get(m));
mentions.add(men);
}
Collections.sort(mentions, new MentionComparator());
// Find representative mention
for (CorefMention men : mentions) {
IntPair position = new IntPair(men.sentNum, men.headIndex);